package cn.com.dhcc.ddi.usermgr.vo.wrapper;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import cn.com.dhcc.app.core.handler.dbhandler.WappedResultSet;
import cn.com.dhcc.ddi.usermgr.vo.UserInfoVo;

public class UserInfoRowWrapper implements RowMapper<UserInfoVo>{

	@Override
	public UserInfoVo mapRow(ResultSet rss, int rowNum) throws SQLException {
		WappedResultSet rs = new WappedResultSet(rss);
		UserInfoVo vo = new UserInfoVo();
		vo.setId(rs.getString("id"));
		vo.setUserName(rs.getString("username"));
		vo.setPassWd(rs.getString("passwd"));
		vo.setTel(rs.getString("tel"));
		vo.setAdmin(rs.getString("admin"));
		vo.setEmail(rs.getString("email"));
		vo.setModified(rs.getTimestamp("modified"));
		vo.setRemark(rs.getString("remark"));
		vo.setStatus(rs.getString("status"));
		vo.setUnitId(rs.getString("unitId"));
		
		vo.setExt1(rs.getString("ext1"));
		vo.setExt2(rs.getString("ext2"));
		
		return vo;
	}

}
